<form id="<?php echo $uniqid;?>" method="post" style="padding: 8px;">
	<table border="0" width="100%" cellspacing="1" cellpadding="5" class="formtable">
		<tr bgcolor="#FFFFFF">
			<td class="tlabel"  width="20%">名称：</td>
			<td><input v-model="params.name" type="text" class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入名称.."  required="true"></td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td class="tlabel"  width="20%">每天最多可发布数量：</td>
			<td width="80%"><input type="text" v-model="params.num_day"  class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="每天最多可发布数量.."   required="true"></td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td class="tlabel"  width="20%">总条数：</td>
			<td width="80%"><input type="text" v-model="params.total"  class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="总条数.."   required="true"></td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td class="tlabel"  width="20%">每天最多可刷新数量：</td>
			<td width="80%"><input type="text" v-model="params.flush_day"  class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="每天最多可刷新数量.."   required="true"></td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td class="tlabel"  width="20%">会员有效期天数：</td>
			<td width="80%"><input type="text" v-model="params.last"  class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="会员有效期天数.."   required="true"></td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td class="tlabel"  width="20%">会员价：</td>
			<td width="80%"><input type="text" v-model="params.price"  class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="会员价.."   required="true"></td>
		</tr>
		<tr bgcolor="#FFFFFF">
			<td class="tlabel"  width="20%">排序：</td>
			<td width="80%"><input type="text" v-model="params.sortorder"  class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="排序.."   required="true"></td>
		</tr>
	</table>
</form>
<script>
	var rankeditVm =  new Vue({
		el: '#<?php echo $uniqid;?>',
		data: {
			params: JSON.parse('<?php echo addslashes($dataset);?>'),
		},
		methods:{
			submit: function(){
				$.post('/admin/membersrank/edit', rankeditVm.params, function (data) {
					if(data.ret==0){
						$.messager.show({
							title:'提示',
							msg:data.msg,
							timeout:3000,
							showType:'slide'
						});
						$('#rankaddfm').form('clear');
						$("#rankdlg").dialog('close');
						$("#rank").datagrid('reload');
					}else{
						$.messager.alert('提示',data.msg,'warning');
					}
				}, 'json');
			}
		}
	});
	$(function(){
		$('#rankeditsubmit').click(function(){
			rankeditVm.submit();
		})
	});
</script>
